<html>
<head><meta charset="utf-8"><title>Thoughts on how to disable local config · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Thoughts.20on.20how.20to.20disable.20local.20config.html">Thoughts on how to disable local config</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="231592436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Thoughts%20on%20how%20to%20disable%20local%20config/near/231592436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Blake Oren <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Thoughts.20on.20how.20to.20disable.20local.20config.html#231592436">(Mar 24 2021 at 07:19)</a>:</h4>
<p>I'm working on testing out various commands with the <code>--offline</code> option and using cargo-local-registry to do some pre-fetching. cargo-local-registry depends on a lockfile being generated to prefetch the required crates. For a new project, I'm able to generate the lockfile and create a local registry before going offline. To point to the local registry I add the <code>[source.crates-io]</code> and <code>[source.local-registry]</code> options into the <code>.../project/.cargo/config.toml</code>.</p>
<p>The pain point starts here. I'm back online and want to update a dependency. To do that and update my local registry, I need to edit/remove the project local <code>.cargo/config.toml</code> so I can generate a new lockfile using the proper <code>crates.io</code> then revert the <code>.cargo/config.toml</code>. </p>
<p>Would a new <code>--ignore-local-config</code> flag be appropriate or is there a better way around this that I'm missing?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>